<?php
$this->pageTitle = Yii::app()->name . ' - Login';
?>
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/login.css" />

<?php Yii::app()->clientScript->registerScript('Login', "
    
     $(document).ready(function(){
       
        $('#forget-password').fancybox();
        $('#link1').fancybox();
        $('#link2').fancybox();
        $('#link3').fancybox();
     });           
	
     ", CClientScript::POS_END); ?>
<div class="header">			
    <div class="wrapper_vendors">			
        <div class="vendors">
            <ul>
                <li><a href="http://www.magner.com/"><img  src="./images/magner.jpg"/></a></li>
                <li><a href="http://fencobankequipment.com/"><img  src="./images/fenco.png"/></a></li>
                <li><a href="http://www.gardall.com/"><img  src="./images/gardall.jpg"/></a></li>
                <li><a href="http://www.fortissecurity.com/"><img  src="./images/fortis.png"/></a></li>					
                <li><a href="http://www.ncr.com/"><img  src="./images/ncr.jpg"/></a></li>
            </ul>
        </div>
    </div>
</div>		
<div style="clear:both; ">	
    <div class="resize">
        <img src="./images/cclogo.png"/>
    </div>
    <div style="text-align: center;">		
    </div>
    <div class="wrapper_labelfrmLogin">	
        <div class="labelfrmLogin">		
        </div>
    </div>
    <div class="footerContainer">	
        <?php
        $form = $this->beginWidget('CActiveForm', array(
                    'id' => 'formLogin',
                ))
        ?>			
        
        <?php
        echo $form->textField($model, 'email', array(
            'id' => 'username',
        ));
        ?>
        <?php
        echo $form->passwordField($model, 'password', array(
            'id' => 'password',
        ));
        ?>			
        <input type="submit" value="" id="submit" name="submit"/>                    
        
        
        <?php $this->endWidget(); ?>            										
    </div>	
</div>

<div class="footer" style="position: absolute;
     bottom: 20px;
     width:100%;
     color: white;
     font-size: 11px;
     left:0;
     right:0;
   
     margin:auto 0;
     text-align:center;
     z-index: 12;">
    <p style="font-weight: bolder;font-size: 15px"><?php if($loginfail):?>
        <b>Please enter correct username and password</b>
        <?php endif?>
    </p>
    <div class="link" style=" height: 22px;     
         clear:both;    
         bottom: 40px;
         width: 350px;		 		 					
         margin:auto;
         display:block;	
         ">
        <ul>
            <li><a id="link1" href='index.php?r=pages/display&id=2'>Terms of service</a></li>
            <li><a id="link2" href='index.php?r=pages/display&id=4'>Privacy policy</a></li>
            <li><a id="link3" href='index.php?r=pages/display&id=2'>Help</a></li>
            <li><a href='#password-form' id="forget-password">Forgot password</a></li>
        </ul>


    </div>
    <div class="copyright" style="height: 20px;
         top: 0px;
         margin:auto;
         width: 300px;		 
         ">
        <div style="color: black;

             font-size: 11px;
             height: 20px;             
             width: 300px;
             color:white;
             z-index: 10;">Copyright @ 1991 - <?= date('Y') ?> QSI, INC. <br/> All Rights Reserved</div>

    </div>
</div>
<div class="clear"></div>
<div style="display:none">
<div class="form" id="password-form">
  

        <?php
        $form = $this->beginWidget('CActiveForm', array(
                    'id' => 'forgetpassword-form',
                    'action'=>'index.php?r=site/forgetpassword',
                    'enableClientValidation' => true,
                    'enableAjaxValidation' => true,
                    'clientOptions' => array(
                        'validateOnSubmit' => true,
                    ),
                ));
        ?>
        <p class="note">Fields with <span class="required">*</span> are required.</p>

            <?php echo $form->errorSummary($forgetpassword); ?>

        <div class="row">
            <?php echo $form->labelEx($forgetpassword, 'email'); ?>

    <?php echo $form->textField($forgetpassword, 'email'); ?>
        <?php echo $form->error($forgetpassword, 'email'); ?>
            
        </div>

            <?php if (CCaptcha::checkRequirements()): ?>
            <div class="row">
                    <?php echo $form->labelEx($forgetpassword, 'verifyCode'); ?>
                <div>

                    <?php $this->widget('CCaptcha'); ?>

        <?php echo $form->textField($forgetpassword, 'verifyCode'); ?>

                </div>
                <div class="hint">Please enter the letters as they are shown in the image above.
                    <br/>Letters are not case-sensitive.</div>
            <?php echo $form->error($forgetpassword, 'verifyCode'); ?>
            </div>
            <?php endif; ?>
        <div id="result"></div>
        <div class="row_buttons">
        <?php echo CHtml::ajaxSubmitButton('Send','index.php?r=site/forgetpassword',array('replace'=>'#result')); ?>
        </div>

        <?php $this->endWidget(); ?>

   
</div></div>